package Exercises;

import java.util.Scanner;

public class Task17 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int a = 0;
		int b = 0;
		int c = 0;
		int sum = 0;
		int perimeter = 0;
		
		while(true)
		{
			System.out.println("Please add a, b and c lines: ");
		a = sc.nextInt();
		b = sc.nextInt();
		c = sc.nextInt();
			if((a < b + c) && (b < a + c) && (c < a + b))
			{   sum = a+b+c;
				if (sum > perimeter)
				{
					perimeter = sum;
				}
			}
			else 
			{
				System.out.println("There is no way for this to be a trangle!");
				System.out.println("The biggest tiangle has a perimetar: "+ perimeter);

				break;
			}
			
		}
		
		
		
		
		
	}

}
